//
//  DefaineCell.m
//  Estate
//
//  Created by heyong on 16/6/22.
//  Copyright © 2016年 ttsx. All rights reserved.
//

#import "DefaineCell.h"

@implementation DefaineCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle=UITableViewCellSelectionStyleNone;
    self.title.font=[UIFont systemFontOfSize:16.*BIZ];
    self.text.font=[UIFont systemFontOfSize:16.*BIZ];
    
    self.title.textColor=UIColorFromRGB(0x797979);
    self.text.textColor=UIColorFromRGB(0x797979);
//    _line=[[UIView alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(self.contentView.frame)-1, DEF_SCREEN_WIDTH-20, 1)];
//    _line.backgroundColor=[UIColor colorWithRed:0.94 green:0.95 blue:0.95 alpha:1.00];
//    [self.contentView addSubview:_line];
}
- (void)setTitle:(NSString *)title andDetail:(NSString *)detail andLeftConstraint :(CGFloat)f{
    NSString *detailStr=@"";
    //旁站类型的判断
    if([detail isEqualToString:@"RECORD_01"]){
        detailStr=@"巡视";
    }else if ([detail isEqualToString:@"RECORD_03"]){
        detailStr=@"安全";
    }else if([detail isEqualToString:@"RECORD_04"]){
        detailStr=@"其它";
    }else if([detail isEqualToString:@"RECORD_07"]){
        detailStr=@"检查";
    }else if([detail isEqualToString:@"RECORD_08"]){
        detailStr=@"质量";
    }else if([detail isEqualToString:@"RECORD_09"]){
        detailStr=@"进度";
    }else if([detail isEqualToString:@"RECORD_10"]){
        detailStr=@"材料设备进场";
    }else if([detail isEqualToString:@"RECORD_11"]){
        detailStr=@"隐蔽检查验收";
    }else if([detail isEqualToString:@"RECORD_12"]){
        detailStr=@"收发文";
    }else if([detail isEqualToString:@"RECORD_13"]){
        detailStr=@"见证取样";
    }else if([detail isEqualToString:@"RECORD_14"]){
        detailStr=@"会议及协调";
    }else{
        detailStr=detail;
    }
    
    self.title.text=title;
    self.text.text=detailStr;
    self.textLeadCinstraint.constant=f;
    self.title.font=[UIFont systemFontOfSize:16.*BIZ];
    self.text.font=[UIFont systemFontOfSize:16.*BIZ];
}

- (void)setTitle:(NSString *)title andDetail:(NSString *)detail{
    self.title.text=title;
    self.text.text=detail;
}

//+ (CGFloat)cellHeightWithObj:(NSString *)string {
//    //标题高度
//    CGFloat cellHeight = 50*BIZ;
//    CGFloat mWidth = [UIScreen mainScreen].bounds.size.width*0.75;
//    cellHeight = [string boundingRectWithSize:CGSizeMake(mWidth,MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin  attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]} context:nil].size.height+30;
//    if(cellHeight<=50*BIZ){
//        cellHeight=50*BIZ;
//    }
//    return cellHeight;
//}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
